package com.fage.configuration;

import com.fage.pojo.User;
import org.springframework.context.annotation.*;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Date;

/**
 * @author lin
 * @version 1.0
 * @date 2020-08-10 16:49
 * @Description TODO
 */
@Configuration
//无需引入
@Import(value = {UserConfigs.class})
@ComponentScan(value = "com.fage")
//开启 spring 对注解 AOP 的支持
@EnableAspectJAutoProxy
//开启事务支持
@EnableTransactionManagement
public class SpringConfiguration {

    @Bean(value = "user")
    public User createUser1() {
        User user1 = new User(1, "user1", 18, new Date());
        user1.setMoney(100);
        return user1;
    }


}
